Get own locks?

How does one get information on one's own locks?

The getLocksInModule/Folder functions that I have tried only seem to return the locks of OTHER users.

 


strathglass - Fri Sep 20 10:14:10 EDT 2019

Re: Get own locks?
strathglass - Wed Oct 09 14:06:58 EDT 2019

Does anyone have any input on this question??

Re: Get own locks?
Mike.Scharnow - Wed Oct 09 14:46:59 EDT 2019

Well, not sure if this is enough for your needs, but your own locks on modules should be the ones that you opened in  share or edit mode.

So, a simple 

Module m
for m in database do {
  // not important here: if (isRead m) then print "read mode: " fullName m "\n"
  if (isShare m) then print "lock b/c of share mode: " fullName m "\n"
  if (isEdit m) then print "lock b/c of edit mode: " fullName m "\n"
}

might be sufficient.

Re: Get own locks?
strathglass - Wed Oct 09 15:02:21 EDT 2019

Well that approach could work: the help seems to indicate it shows ALL open modules, but in fact only seems to show YOUR open modules.

So I would next have to check each one using isEdit() or isShare() to see if I have it locked (could also use isRead to see if I have it open/unlocked). [ EDIT...which I see you pointed out already! :) ]

(Would also have to restrict based on folder, if required.)

Thnx